import direction
import pygame
from actor import Actor

class Player(Actor):
	def OnKeyChanged(self, newDirection):
		if not self._takingStep:
			if(newDirection == direction.Down):
				self.MoveDown()
			if(newDirection == direction.Up):
				self.MoveUp()
			if(newDirection == direction.Left):
				self.MoveLeft()
			if(newDirection == direction.Right):
				self.MoveRight()
			if(newDirection == direction.Stopped):
				self.StopMoving()